class FormDemo extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      value : 'test' 
    }
    this.handleChange = this.handleChange.bind(this);
  }
  handleChange(e) {
    this.setState({
      value: e.target.value
    })
  }
  render() {
    return (
      <div>
        <p> value: {this.state.value} </p>
        <input value={this.state.value} onChange={this.handleChange} />
      </div>
    );
  }
}
ReactDOM.render(
  <FormDemo />,
  document.getElementById('root')
);